package obj.day3.test2;

import java.util.Scanner;

/**
 * @author げっしょく
 * @date 2021/7/18
 */
public class Test3 {
    public static void main(String[] args) {
        useIGet(()->{
            Scanner sc = new Scanner(System.in);
            String str = sc.nextLine();
            return str;
        });
        useIGet(new IGetString() {
            @Override
            public String get() {
                Scanner sc = new Scanner(System.in);
                String str = sc.nextLine();
                return str;
            }
        });
    }
    public static void useIGet(IGetString iGetString){
        String str = iGetString.get();
        System.out.println(str);
    }
}
interface IGetString{
    String get();
}
